package router

import (
	"gitee.com/wangshh_123/cross-pay-go/src/controller/platform"
	"gitee.com/wangshh_123/cross-pay-go/src/middleware"
	"github.com/gin-gonic/gin"
)

// SetupTransactionRoutes 设置交易相关路由
func SetupTransactionRoutes(r *gin.RouterGroup, unifiedTransactionController *platform.UnifiedTransactionController) {
	// 交易相关路由组
	transactionGroup := r.Group("/transactions")
	{
		// 统一交易接口 - 根据用户平台自动选择
		transactionGroup.GET("/list", middleware.AuthMiddleware(), middleware.PlatformInfoMiddleware(), unifiedTransactionController.GetTransactionList)     // 获取交易列表
		transactionGroup.GET("/detail", middleware.AuthMiddleware(), middleware.PlatformInfoMiddleware(), unifiedTransactionController.GetTransactionDetail) // 获取交易详情
	}
}
